#include <stdio.h>
#include <string.h>


// 结构体 声明为全局
struct student {
    char name[20];
    int id;
    int score;
};

int main(int argc, char const *argv[])
{
    struct student stu;
    // stu.name = "zhangsan"; 字符串无法赋值给地址值
    strcpy(stu.name, "zhangsan");

    struct student *p = &stu;

    p->score = 100;

    (&stu)->id = 20;

    // print

    printf("Name \t ID \t Score\n");
    printf("%s \t %d \t %d \n", stu.name, stu.id, stu.score);
    return 0;
}
